Repository navigation
feat(id-caps): host-side policy point for the MCP bridge (spike #6300 step 4, #7916) - #13192
Merged
Merged
Conversation
…step 4, #7916) New mcp_policy module wrapping BridgeSession: capability-ceiling check set at role grant (tools, worlds, object classes, program allowlist), per-session quota charged before execution with visible parking on exhaustion ("agent parked, quota exhausted"), and one signed, hash-chained audit event per action including refusals and stale-input rejections, with an owner-readable summary. The agent is the audit subject, never its editor: log and spend are read-only from the session API.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 44 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #7916 — spike step 4/5 for #6300 (policy point), after step 2's bridge (PR #13161).
What lands
New
id_caps::mcp_policymodule: the host-side policy point the bridge's module docs defer to. APolicySessionwraps aBridgeSessionand runs every agent tool call through the design's order (#6300 §§6–7):agent parked, quota exhausted.world.leaveis never refused — the exit is charged nothing and still audited.verify_audit_chainchecks sequence, links, hashes, and signatures end-to-end. The stale-decision rule is enforced here: ascreen_revisiontoken naming anything but the latest observed revision is refused as stale input. The agent is the subject, never the editor — log and spend are read-only from the session API. Owner summary renders actions / spend / refusals in the §7 shape.program.invokearrives with step 5; the policy point already enforces its allowlist and charges its quota axis (an admitted invoke currently ends as an audited bridge refusal, charge standing).Verification
cargo test -p id-caps --libinnix develop(pkgs/id, laptop worktree at this head): 249 passed / 0 failed, including 9 newmcp_policytests named against id(phase-14): spike 4/5 — policy point: capability ceiling, session quota, audit log #7916's acceptance criteria (ceiling refusal audited + never executed; quota parking visible + summary; chain verifies end-to-end, tamper/link/signature attacks fail; stale-input rejection; object-class ceiling; program allowlist + program-axis charge; serde round-trip still verifies; no-mutation API shape).cargo clippy -p id-caps --lib: zero findings in the new files (crate total went 177 → 172 pre-existing warnings; the 26 denied-lint errors inlibrary_attach.rstests under--all-targetsare the pre-existing id phase-8: P8.8 clippy/lint sweep deferred — ~150 clippy warnings remain with no tracking issue #803 set, untouched).cargo fmt -p id-capsapplied.nixbldgroup missing), so verification ran on the laptop per the established pkgs/id route.{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-23T10:32:13Z", "session_id": null, "lane": null, "host": "amd", "worktree": null, "model": null, "lane_start_issues": [], "workspace_ref": null, "auth_subject": "oc-code-08", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.